package com.example.sendmessage.server.mapper;

import com.example.sendmessage.server.core.Binding;
import com.example.sendmessage.server.core.Exchange;
import com.example.sendmessage.server.core.Queue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MetaMapper {
    // 创建对应表
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

    // 增删查方法
    void insertExchange(Exchange exchange);
    void deleteExchange(String exchangeName);
    List<Exchange> selectAllExchanges();

    void insertQueue(Queue queue);
    void deleteQueue(String queueName);
    List<Queue> selectAllQueues();

    void insertBinding(Binding binding);
    void deleteBinding(Binding binding);
    List<Binding> selectAllBindings();
}
